<table class="layui-table text-center" lay-size="sm">
    <thead>
        <tr>
            <th style="width: 48px">#</th>
            <th>
                <div class="text-left">分类名</div>
            </th>
            <th>状态</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {volist name="list" id="item"}
            <tr>
                <td>{$key+1}</td>
                <td>
                    <div class="text-left">{php}echo str_repeat("├─",$item['level']);{/php}{$item.name}</div>
                </td>

                <td>
                    {php}$status = $item['status'];{/php}
                    <a href="{:url('save',['cate_id'=>$item['cate_id'], 'status'=>abs(1-$status)])}" class="ajax-get" msg="0" style="font-size: 16px;">
                        {$status?'<i class="fa fa-unlock"></i>':'<i class="fa fa-lock text-red"></i>'}</a>
                </td>
                <td><a href="{:url('add',['cate_id'=>$item['cate_id']])}" class="layui-btn layui-btn-xs layui-btn-normal  ajax-form" title="分类">编辑</a>
                    <a href="{:url('delete',['ids'=>$item['cate_id']])}" title="删除" confirm="1" class="layui-btn layui-btn-xs layui-btn-danger ajax-get">删除</a> </td>
            </tr>
        {/volist}
        {empty name="list"}
        <tr>
            <td colspan="4">没有数据</td>
        </tr>
        {/empty}
    </tbody>
</table>